﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="XYGL.ascx.cs" Inherits="XYTXL.Web.View.UCMangForm.XYGL" %>
<link href="/View/JS/umeditor122/themes/default/css/umeditor.css" type="text/css" rel="stylesheet" />
<script src="/View/JS/umeditor122/umeditor.js" type="text/javascript" charset="utf-8"></script>
<script src="/View/JS/umeditor122/umeditor.config.js" type="text/javascript" charset="utf-8"></script>
<script src="/View/JS/avalon1.47.js"></script>
<ul class="nav nav-tabs" role="tablist">
    <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">基本资料</a></li>
    <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">学习经历及工作经历</a></li>
</ul>
<div class="tab-content" ms-controller="PAGE">
    <div role="tabpanel" class="tab-pane active" id="home" style="margin: 10px">
        <div class="row">
            <div class="col-xs-11">
                <div class="form-group">
                    <div class="row">
                        <div class="col-xs-4 ">
                            <div class="form-group">
                                <label>年级</label>
                                <asp:DropDownList ID="ddNj" runat="server" CssClass="form-control" AutoPostBack="True" OnSelectedIndexChanged="ddNj_SelectedIndexChanged">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-xs-4 ">
                            <div class="form-group">

                                <label>院系</label>
                                <asp:DropDownList ID="ddYx" runat="server" CssClass="form-control" AutoPostBack="True" OnSelectedIndexChanged="ddYx_SelectedIndexChanged">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-xs-4 ">
                            <div class="form-group">

                                <label>专业</label>
                                <asp:DropDownList ID="ddZy" runat="server" CssClass="form-control" AutoPostBack="True" OnSelectedIndexChanged="ddZY_SelectedIndexChanged">
                                </asp:DropDownList>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-xs-4 ">

                            <div class="form-group">

                                <label>班级</label>
                                <asp:DropDownList ID="conBJ" runat="server" CssClass="form-control">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-xs-4 ">

                            <div class="form-group">

                                <label>学号</label>
                                <asp:TextBox ID="txtXh" runat="server" CssClass="form-control "></asp:TextBox>

                            </div>
                        </div>
                        <div class="col-xs-4 ">

                            <div class="form-group">

                                <label>姓名</label>
                                <asp:TextBox ID="txtXm" runat="server" CssClass="form-control validate[required]"></asp:TextBox>
                            </div>
                        </div>

                    </div>
                    <div class="row">
                        <div class="col-xs-4 ">

                            <div class="form-group">

                                <label>性别</label>
                                <asp:DropDownList ID="ddlXB" runat="server" CssClass="form-control validate[required]">
                                    <asp:ListItem Text="男" />
                                    <asp:ListItem Text="女" />

                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-xs-4 ">

                            <div class="form-group">

                                <label>校友级别</label>
                                <asp:DropDownList ID="ddlJB" runat="server" CssClass="form-control validate[required]">
                                    <asp:ListItem Text="普通" />
                                    <asp:ListItem Text="一级" />
                                    <asp:ListItem Text="二级" />
                                    <asp:ListItem Text="三级" />

                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-xs-4 ">

                            <div class="form-group">

                                <label>校友企业类型</label>
                                <asp:DropDownList ID="ddlLX" runat="server" CssClass="form-control validate[required]">
                                    <asp:ListItem Text="政府单位" />
                                    <asp:ListItem Text="事业单位" />
                                    <asp:ListItem Text="跨国企业" />
                                    <asp:ListItem Text="国有企业" />
                                    <asp:ListItem Text="大型民企" />
                                    <asp:ListItem Text="中型民企" />
                                    <asp:ListItem Text="中小型民企" />
                                    <asp:ListItem Text="其他" />

                                </asp:DropDownList>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-xs-4 ">

                            <div class="form-group">

                                <label>联系电话</label>
                                <asp:TextBox ID="conPhone" runat="server" CssClass="form-control"></asp:TextBox>
                            </div>
                        </div>
                        <div class="col-xs-4 ">

                            <div class="form-group">

                                <label>用户名</label>
                                <asp:TextBox ID="conYHM" runat="server" CssClass="form-control validate[required]" autocomplete="off"></asp:TextBox>

                            </div>
                        </div>
                        <div class="col-xs-4 ">

                            <div class="form-group">

                                <label>登陆密码</label>
                                <asp:TextBox ID="conMM" runat="server" CssClass="form-control validate[required]" placeholder="请输入密码" autocomplete="off" onfocus="this.type='password'"></asp:TextBox>
                            </div>
                        </div>

                    </div>
                </div>
            </div>

        </div>
    </div>
    <div role="tabpanel" class="tab-pane" id="profile" style="margin: 10px">
        <table class="table table-bordered table-striped table-hover">
            <thead>
                <tr>
                    <th style="text-align: center" colspan="5">学习经历</th>
                </tr>
                <tr>
                    <th>开始时间</th>
                    <th>结束时间</th>
                    <th>地点</th>
                    <th>学历</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <tr ms-repeat-item="xxjl">
                    <td>{{item.sdate}}</td>
                    <td>{{item.edate}}</td>
                    <td>{{item.dd}}</td>
                    <td>{{item.xl}}</td>
                    <td><a style="color: red" ms-click="$remove">删除</a></td>

                </tr>

            </tbody>
            <tfoot>
                <tr>
                    <th>
                        <input type="text" id="xxsdate" class="form-control input-sm form_date" /></th>
                    <th>
                        <input type="text" id="xxedate" class="form-control input-sm form_date" /></th>
                    <th>
                        <input type="text" id="xxdd" class="form-control input-sm" /></th>
                    <th>
                        <select class="form-control input-sm" id="xxxl">
                            <option value="小学">小学</option>
                            <option value="初中">初中</option>
                            <option value="高中">高中</option>
                            <option value="大专">大专</option>
                            <option value="本科">本科</option>
                            <option value="硕士">硕士</option>
                            <option value="博士">博士</option>

                        </select>
                    </th>
                    <th><a ms-click="addxxjl()">添加</a> </th>
                </tr>
            </tfoot>
        </table>
        <table class="table table-bordered table-striped table-hover">
            <thead>
                <tr>
                    <th style="text-align: center" colspan="5">工作经历</th>
                </tr>
                <tr>
                    <th>开始时间</th>
                    <th>结束时间</th>
                    <th>地点</th>
                    <th>企业名称</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <tr ms-repeat-item="gzjl">
                    <td>{{item.sdate}}</td>
                    <td>{{item.edate}}</td>
                    <td>{{item.dd}}</td>
                    <td>{{item.qymc}}</td>
                    <td><a style="color: red" ms-click="$remove">删除</a></td>

                </tr>

            </tbody>
            <tfoot>
                <tr>
                    <th>
                        <input type="text" id="gzsdate" class="form-control input-sm form_date" /></th>
                    <th>
                        <input type="text" id="gzedate" class="form-control input-sm form_date" /></th>
                    <th>
                        <input type="text" id="gzdd" class="form-control input-sm" /></th>
                    <th>
                        <input type="text" class="form-control input-sm" id="gzqymc" /></th>
                    <th><a ms-click="addgzjl()">添加</a> </th>
                </tr>
            </tfoot>
        </table>
    </div>
    <input type="hidden" id="hidxxjl" class="hidxxjl" value="" runat="server" />
    <input type="hidden" id="hidgzjl" value="" class="hidgzjl" runat="server" />

</div>

<script>

    var model = avalon.define({
        $id: "PAGE",
        xxjl: [],
        gzjl: [],
        addxxjl: function () {
            model.xxjl.push({ sdate: $("#xxsdate").val(), edate: $("#xxedate").val(), dd: $("#xxdd").val(), xl: $("#xxxl").val() })
        },
        addgzjl: function () {
            model.gzjl.push({ sdate: $("#gzsdate").val(), edate: $("#gzedate").val(), dd: $("#gzdd").val(), qymc: $("#gzqymc").val() })
        }
    })
    avalon.ready(function () {
        if ($(".hidxxjl").val()) {
            model.xxjl = JSON.parse($(".hidxxjl").val())
        }
        if ($(".hidgzjl").val()) {
            model.gzjl = JSON.parse($(".hidgzjl").val())
        }
    })
    function getdata() {
        $(".hidxxjl").val(JSON.stringify(model.xxjl.$model))
        $(".hidgzjl").val(JSON.stringify(model.gzjl.$model))
     

    }
</script>
